package com.lysh.simple;

import java.io.Serializable;

/**
 * @author liyishan
 * @date 2023/8/4 15:49
 * @apiNote
 */

public class BusinessException  extends RuntimeException implements Serializable {
    private String code;
    private String msg;

    public BusinessException(String code, String msg) {
        super(msg);
        this.code = code;
        this.msg = msg;
    }

    public BusinessException(String msg) {
        super(msg);
        this.code = "BusinessCode.FATAL.getCode()";
        this.msg = msg;
    }


    public String getCode() {
        return this.code;
    }

    public String getMsg() {
        return this.msg;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
